package top.haijunit.navi.auth.domain;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import top.haijunit.framework.validation.ValidChecks;

/**
 * 权限组信息
 *
 * @author zhanghaijun
 * @since 2024-09-02
 */
@Data
public class PermissionGroupInfo {

    /**
     * 权限组编码
     */
    @Schema(description = "权限组编码")
    @NotNull(message = "权限组编码不能为空", groups = {ValidChecks.GroupAdd.class, ValidChecks.GroupEdit.class})
    private Long permissionGroupId;

    /**
     * 权限组名称
     */
    @Schema(description = "权限组名称")
    @NotBlank(message = "权限组名称不能为空", groups = {ValidChecks.GroupAdd.class, ValidChecks.GroupEdit.class})
    @Length(min = 2, max = 16, message = "权限组名称长度在2-16个字符", groups = {ValidChecks.GroupAdd.class, ValidChecks.GroupEdit.class})
    private String groupName;

    /**
     * 权限组描述
     */
    @Schema(description = "权限组描述")
    @Length(max = 128, message = "权限组描述长度不能超过128个字符", groups = {ValidChecks.GroupAdd.class, ValidChecks.GroupEdit.class})
    private String groupDesc;
}
